package com.ai.mapper;

import com.ai.entity.Patient;
import com.ai.entity.dto.CallAndPatient;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PatientMapper extends BaseMapper<Patient> {

    @Select("select c.empi_id,p.name,c.trans_text from patient p left join base_call c on p.empi_id = c.empi_id where p.name = #{itemName}")
    List<CallAndPatient> findCallAndPatientByName(String itemName);

}
